<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class AlterTableSystemNotifyCenterAddPushFields extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('system_notify_center', function (Blueprint $table) {
            $table->tinyInteger("pushType")->default(0)->comment("推送类型  0 - 默认 1 - 文章 2 - 链接 3 - 图文");
            $table->string("pushLocationUrl")->default("")->comment("推送跳转地址");
            $table->string("pushTargetId")->default(0)->comment("推送目标id");
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('system_notify_center', function (Blueprint $table) {
            $table->dropColumn(["pushType", "pushLocationUrl", "pushTargetId"]);
        });
    }
}
